/**
 * 
 */
package com.blumov.fastbox.application.exceptions;

import org.springframework.aop.ThrowsAdvice;

/**
 * Intercepta las excepciones que lanzan los servicios
 */
public class ExceptionAdvice implements ThrowsAdvice {

	ExceptionAnalyzer exceptionAnalyzer;

	/**
	 * despues que algun servicio lance una excepcion.<br>
	 * 
	 * @param thisException
	 */
	public void afterThrowing(Throwable thisException) {
		exceptionAnalyzer.analize(thisException);
	}

	/**
	 * @param exceptionAnalyzer the exceptionAnalyzer to set
	 */
	public void setExceptionAnalyzer(ExceptionAnalyzer exceptionAnalyzer) {
		this.exceptionAnalyzer = exceptionAnalyzer;
	}

}
